Integrand size = 21, antiderivative size = 129 \[ \int \csc ^6(c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {2 a^2 \text {arctanh}(\sin (c+d x))}{d}-\frac {4 a^2 \cot (c+d x)}{d}-\frac {5 a^2 \cot ^3(c+d x)}{3 d}-\frac {2 a^2 \cot ^5(c+d x)}{5 d}-\frac {2 a^2 \csc (c+d x)}{d}-\frac {2 a^2 \csc ^3(c+d x)}{3 d}-\frac {2 a^2 \csc ^5(c+d x)}{5 d}+\frac {a^2 \tan (c+d x)}{d} \]
[Out]
Time = 0.29 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.381, Rules used = {3957, 2952, 3852, 2701, 308, 213, 2700, 276} \[ \int \csc ^6(c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {2 a^2 \text {arctanh}(\sin (c+d x))}{d}+\frac {a^2 \tan (c+d x)}{d}-\frac {2 a^2 \cot ^5(c+d x)}{5 d}-\frac {5 a^2 \cot ^3(c+d x)}{3 d}-\frac {4 a^2 \cot (c+d x)}{d}-\frac {2 a^2 \csc ^5(c+d x)}{5 d}-\frac {2 a^2 \csc ^3(c+d x)}{3 d}-\frac {2 a^2 \csc (c+d x)}{d} \]
[In]
[Out]
Rule 213
Rule 276
Rule 308
Rule 2700
Rule 2701
Rule 2952
Rule 3852
Rule 3957
Rubi steps \begin{align*} \text {integral}& = \int (-a-a \cos (c+d x))^2 \csc ^6(c+d x) \sec ^2(c+d x) \, dx \\ & = \int \left (a^2 \csc ^6(c+d x)+2 a^2 \csc ^6(c+d x) \sec (c+d x)+a^2 \csc ^6(c+d x) \sec ^2(c+d x)\right ) \, dx \\ & = a^2 \int \csc ^6(c+d x) \, dx+a^2 \int \csc ^6(c+d x) \sec ^2(c+d x) \, dx+\left (2 a^2\right ) \int \csc ^6(c+d x) \sec (c+d x) \, dx \\ & = \frac {a^2 \text {Subst}\left (\int \frac {\left (1+x^2\right )^3}{x^6} \, dx,x,\tan (c+d x)\right )}{d}-\frac {a^2 \text {Subst}\left (\int \left (1+2 x^2+x^4\right ) \, dx,x,\cot (c+d x)\right )}{d}-\frac {\left (2 a^2\right ) \text {Subst}\left (\int \frac {x^6}{-1+x^2} \, dx,x,\csc (c+d x)\right )}{d} \\ & = -\frac {a^2 \cot (c+d x)}{d}-\frac {2 a^2 \cot ^3(c+d x)}{3 d}-\frac {a^2 \cot ^5(c+d x)}{5 d}+\frac {a^2 \text {Subst}\left (\int \left (1+\frac {1}{x^6}+\frac {3}{x^4}+\frac {3}{x^2}\right ) \, dx,x,\tan (c+d x)\right )}{d}-\frac {\left (2 a^2\right ) \text {Subst}\left (\int \left (1+x^2+x^4+\frac {1}{-1+x^2}\right ) \, dx,x,\csc (c+d x)\right )}{d} \\ & = -\frac {4 a^2 \cot (c+d x)}{d}-\frac {5 a^2 \cot ^3(c+d x)}{3 d}-\frac {2 a^2 \cot ^5(c+d x)}{5 d}-\frac {2 a^2 \csc (c+d x)}{d}-\frac {2 a^2 \csc ^3(c+d x)}{3 d}-\frac {2 a^2 \csc ^5(c+d x)}{5 d}+\frac {a^2 \tan (c+d x)}{d}-\frac {\left (2 a^2\right ) \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\csc (c+d x)\right )}{d} \\ & = \frac {2 a^2 \text {arctanh}(\sin (c+d x))}{d}-\frac {4 a^2 \cot (c+d x)}{d}-\frac {5 a^2 \cot ^3(c+d x)}{3 d}-\frac {2 a^2 \cot ^5(c+d x)}{5 d}-\frac {2 a^2 \csc (c+d x)}{d}-\frac {2 a^2 \csc ^3(c+d x)}{3 d}-\frac {2 a^2 \csc ^5(c+d x)}{5 d}+\frac {a^2 \tan (c+d x)}{d} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(317\) vs. \(2(129)=258\).
Time = 1.42 (sec) , antiderivative size = 317, normalized size of antiderivative = 2.46 \[ \int \csc ^6(c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {a^2 \cos (c+d x) \sec ^4\left (\frac {1}{2} (c+d x)\right ) (1+\sec (c+d x))^2 \left (-3840 \cos (c+d x) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+3840 \cos (c+d x) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+\csc (2 c) \csc ^4\left (\frac {1}{2} (c+d x)\right ) \csc (c+d x) (320 \sin (2 c)-596 \sin (d x)+864 \sin (2 d x)+216 \sin (c-d x)-416 \sin (c+d x)+624 \sin (2 (c+d x))-416 \sin (3 (c+d x))+104 \sin (4 (c+d x))-596 \sin (2 c+d x)-680 \sin (3 c+d x)+894 \sin (c+2 d x)+224 \sin (2 (c+2 d x))+894 \sin (3 c+2 d x)+480 \sin (4 c+2 d x)-776 \sin (c+3 d x)-596 \sin (2 c+3 d x)-596 \sin (4 c+3 d x)-120 \sin (5 c+3 d x)+149 \sin (3 c+4 d x)+149 \sin (5 c+4 d x))\right )}{7680 d} \]
[In]
[Out]
Time = 1.33 (sec) , antiderivative size = 154, normalized size of antiderivative = 1.19
method | result | size |
norman | \(\frac {\frac {a^{2}}{40 d}+\frac {4 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{15 d}+\frac {31 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{12 d}-\frac {5 a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{d}+\frac {a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}}{8 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} \left (-1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )}-\frac {2 a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}+\frac {2 a^{2} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}\) | \(154\) |
derivativedivides | \(\frac {a^{2} \left (-\frac {1}{5 \sin \left (d x +c \right )^{5} \cos \left (d x +c \right )}-\frac {2}{5 \sin \left (d x +c \right )^{3} \cos \left (d x +c \right )}+\frac {8}{5 \sin \left (d x +c \right ) \cos \left (d x +c \right )}-\frac {16 \cot \left (d x +c \right )}{5}\right )+2 a^{2} \left (-\frac {1}{5 \sin \left (d x +c \right )^{5}}-\frac {1}{3 \sin \left (d x +c \right )^{3}}-\frac {1}{\sin \left (d x +c \right )}+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+a^{2} \left (-\frac {8}{15}-\frac {\csc \left (d x +c \right )^{4}}{5}-\frac {4 \csc \left (d x +c \right )^{2}}{15}\right ) \cot \left (d x +c \right )}{d}\) | \(155\) |
default | \(\frac {a^{2} \left (-\frac {1}{5 \sin \left (d x +c \right )^{5} \cos \left (d x +c \right )}-\frac {2}{5 \sin \left (d x +c \right )^{3} \cos \left (d x +c \right )}+\frac {8}{5 \sin \left (d x +c \right ) \cos \left (d x +c \right )}-\frac {16 \cot \left (d x +c \right )}{5}\right )+2 a^{2} \left (-\frac {1}{5 \sin \left (d x +c \right )^{5}}-\frac {1}{3 \sin \left (d x +c \right )^{3}}-\frac {1}{\sin \left (d x +c \right )}+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+a^{2} \left (-\frac {8}{15}-\frac {\csc \left (d x +c \right )^{4}}{5}-\frac {4 \csc \left (d x +c \right )^{2}}{15}\right ) \cot \left (d x +c \right )}{d}\) | \(155\) |
parallelrisch | \(\frac {a^{2} \left (3 \cot \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}+240 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-240 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+15 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}+32 \cot \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}-240 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+240 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-600 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+310 \cot \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{120 d \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-120 d}\) | \(165\) |
risch | \(-\frac {4 i a^{2} \left (15 \,{\mathrm e}^{7 i \left (d x +c \right )}-60 \,{\mathrm e}^{6 i \left (d x +c \right )}+85 \,{\mathrm e}^{5 i \left (d x +c \right )}-40 \,{\mathrm e}^{4 i \left (d x +c \right )}-27 \,{\mathrm e}^{3 i \left (d x +c \right )}+108 \,{\mathrm e}^{2 i \left (d x +c \right )}-97 \,{\mathrm e}^{i \left (d x +c \right )}+28\right )}{15 d \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )^{5} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}-\frac {2 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}+\frac {2 a^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}\) | \(171\) |
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 206, normalized size of antiderivative = 1.60 \[ \int \csc ^6(c+d x) (a+a \sec (c+d x))^2 \, dx=-\frac {56 \, a^{2} \cos \left (d x + c\right )^{4} - 82 \, a^{2} \cos \left (d x + c\right )^{3} - 32 \, a^{2} \cos \left (d x + c\right )^{2} + 76 \, a^{2} \cos \left (d x + c\right ) - 15 \, {\left (a^{2} \cos \left (d x + c\right )^{3} - 2 \, a^{2} \cos \left (d x + c\right )^{2} + a^{2} \cos \left (d x + c\right )\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) \sin \left (d x + c\right ) + 15 \, {\left (a^{2} \cos \left (d x + c\right )^{3} - 2 \, a^{2} \cos \left (d x + c\right )^{2} + a^{2} \cos \left (d x + c\right )\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) \sin \left (d x + c\right ) - 15 \, a^{2}}{15 \, {\left (d \cos \left (d x + c\right )^{3} - 2 \, d \cos \left (d x + c\right )^{2} + d \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )} \]
[In]
[Out]
Timed out. \[ \int \csc ^6(c+d x) (a+a \sec (c+d x))^2 \, dx=\text {Timed out} \]
[In]
[Out]
none
Time = 0.20 (sec) , antiderivative size = 144, normalized size of antiderivative = 1.12 \[ \int \csc ^6(c+d x) (a+a \sec (c+d x))^2 \, dx=-\frac {a^{2} {\left (\frac {2 \, {\left (15 \, \sin \left (d x + c\right )^{4} + 5 \, \sin \left (d x + c\right )^{2} + 3\right )}}{\sin \left (d x + c\right )^{5}} - 15 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 15 \, \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 3 \, a^{2} {\left (\frac {15 \, \tan \left (d x + c\right )^{4} + 5 \, \tan \left (d x + c\right )^{2} + 1}{\tan \left (d x + c\right )^{5}} - 5 \, \tan \left (d x + c\right )\right )} + \frac {{\left (15 \, \tan \left (d x + c\right )^{4} + 10 \, \tan \left (d x + c\right )^{2} + 3\right )} a^{2}}{\tan \left (d x + c\right )^{5}}}{15 \, d} \]
[In]
[Out]
none
Time = 0.35 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.05 \[ \int \csc ^6(c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {240 \, a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 240 \, a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + 15 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {240 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1} - \frac {345 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 35 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 3 \, a^{2}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5}}}{120 \, d} \]
[In]
[Out]
Time = 13.73 (sec) , antiderivative size = 124, normalized size of antiderivative = 0.96 \[ \int \csc ^6(c+d x) (a+a \sec (c+d x))^2 \, dx=\frac {4\,a^2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}-\frac {-39\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\frac {62\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{3}+\frac {32\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{15}+\frac {a^2}{5}}{d\,\left (8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5-8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\right )}+\frac {a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,d} \]
[In]
[Out]